package ee.subjects.frontend.controller.command;

public class PersonCommandFactory{

	public Command getCommand(String event){

		Command Command = null;

		try{
			
			if (event.equals("insert_person")){
				Command = new InsertPersonCommand();
			}
			
			if (event.equals("edit_person")){
				Command = new EditPersonCommand();
			}
			
			if (event.equals("validate_person")){
				Command = new ValidatePersonCommand();
			}
			
			if (event.equals("save_person")){
				Command = new SavePersonCommand();
			}

		} catch (Exception ex){
			//TODO Logimine
			//MyLogger.Log("AutoCommandFactory.getCommand():",ex.getMessage());
		}
		return Command;
	}
}
